class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table "categories", :force => true do |t|  
      t.column "id", :int  
      t.column "name", :string   
      t.column(:blogs_count, :integer, :default=>0)
    end  
    add_index :categories, :name, :unique  => true  
  end

  def self.down
    drop_table :categories
  end
end
